﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Sigma.Admin.API.Migrations
{
    public partial class init5 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Url",
                table: "Permissions");

            migrationBuilder.RenameColumn(
                name: "PermissionName",
                table: "Permissions",
                newName: "TitleName");

            migrationBuilder.RenameColumn(
                name: "ParentId",
                table: "Permissions",
                newName: "PId");

            migrationBuilder.RenameColumn(
                name: "Title",
                table: "Mesnus",
                newName: "TitleName");

            migrationBuilder.AddColumn<string>(
                name: "Target",
                table: "Permissions",
                type: "TEXT",
                nullable: false,
                defaultValue: "");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Target",
                table: "Permissions");

            migrationBuilder.RenameColumn(
                name: "TitleName",
                table: "Permissions",
                newName: "PermissionName");

            migrationBuilder.RenameColumn(
                name: "PId",
                table: "Permissions",
                newName: "ParentId");

            migrationBuilder.RenameColumn(
                name: "TitleName",
                table: "Mesnus",
                newName: "Title");

            migrationBuilder.AddColumn<string>(
                name: "Url",
                table: "Permissions",
                type: "TEXT",
                nullable: true);
        }
    }
}
